// JavaScript Document
function idTabs(selector,className){
	var prevClick=null;
	var runing=false;
	var speed=500;
	this.init=function(){
		addListener();
		prevClick=$(selector + " a." + className).get(0);
		var abc;
	}
	function addListener(){
		$(selector + " a").click(showPanel);
	}
	function showPanel(){
	    this.blur();
		if(prevClick==this || runing!=false) return false;
		if(prevClick!=null){
			$(prevClick.hash).hide();
			$(prevClick).removeClass(className);
		}
		prevClick=this;
		//runing=true;
		$(this.hash).animate({opacity:"show"},speed,function(){runing=false});
		$(this).addClass(className);
		return false;
	}	
}